{extend name="common/base" /}
{block name="body"}
<div class="soye-hui">
    <div  class="dsk-mains">
        {switch name="$task_info.order_status"}
        {case value="0"}
        <!-- 未提交 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">请在规定时间内完成上刊，逾期自动失效</p>
            <a href="{:url('Task/sk',array('oid'=>$task_info['order_id']))}"> <div class="dsk-top-butt">完成上刊</div></a>
            <p class="dsk-top-ps2 js-cancel">取消任务</p>
        </div>
        {/case}
        {case value="10"}
        <!-- 未提交 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">请在规定时间内完成上刊，逾期自动失效</p>
            <a href="{:url('Task/sk',array('oid'=>$task_info['order_id']))}"> <div class="dsk-top-butt">完成上刊</div></a>
            <p class="dsk-top-ps2 js-cancel">取消任务</p>
        </div>
        {/case}
        {case value="13"}
        <!-- 未提交 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">请在规定时间内完成上刊，并提交审核,逾期自动失效</p>
            <a href="{:url('Task/sk',array('oid'=>$task_info['order_id']))}"> <div class="dsk-top-butt">更新任务进度</div></a>
            <p class="dsk-top-ps2 js-cancel">取消任务</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">

                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}                         
                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div>
        {/case}
        {case value="90"}
        <!-- 已失效 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn_quxiao.png" class="dsk-top-img dsk-top-img2">
            <p class="dsk-top-ps dsk-top-psd">已失效</p>
            <p class="dsk-top-ps dsk-top-psd df-ps">主动取消任务，任务失效</p>        
        </div>
        {/case}
        {case value="91"}
        <!-- 已失效 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn_quxiao.png" class="dsk-top-img dsk-top-img2">
            <p class="dsk-top-ps dsk-top-psd">已失效</p>
            <p class="dsk-top-ps dsk-top-psd df-ps">超时未完成上刊</p>        
        </div>
        {/case}
        {case value="92"}
        <!-- 已失效 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn_quxiao.png" class="dsk-top-img dsk-top-img2">
            <p class="dsk-top-ps dsk-top-psd">已失效</p>
            <p class="dsk-top-ps dsk-top-psd df-ps">超时未更新任务进度</p>        
        </div>
        {/case}
        {case value="20"}
        <!-- 已完成 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn_yiwancheng.png" class="dsk-top-img">
            <p class="dsk-top-ps"><i>已完成</i></p>
            <p class="dsk-top-ps"><i>酬金已转入您的余额，请及时查收！</i></p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">>

                <div class="dsk-che-list">
                    <ul class="list-nav">
                        {volist name="position_list" id="vo"}
                        <li>
                            <div class="nav-ps">{$vo.position_name}车身照</div>
                            <img src="__CDN__/html/img/tu1.jpg" class="img">
                        </li>
                        {/volist}                        
                    </ul>  
                    <div class="nv-tu">
                        <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                    </div>       
                </div> 
            </a>
        </div> 
        {/case}
        {case value="1"}
        <!-- 上刊审核中 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">上刊审核中，请耐心等待。</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">>

                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}                           
                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div> 
        {/case}
        {case value="2"}
        <!-- 上刊审核被拒 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">上刊审不通过，请<a href="{:url('Task/sk',array('oid'=>$task_info['order_id']))}"> <i>重新提交</i></a></p>
            <p class="dsk-top-ps dsk-top-pst">不通过原因:{$refusal_reason}</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">>

                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}                           
                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div> 
        {/case}
        {case value="11"}
        <!-- 上刊审核中 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">上刊审核中，请耐心等待。</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">>

                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}                         
                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div> 
        {/case}
        {case value="12"}
        <!-- 上刊审核被拒 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">上刊审不通过，请<a href="{:url('Task/sk',array('oid'=>$task_info['order_id']))}"> <i>重新提交</i></a></p>
            <p class="dsk-top-ps dsk-top-pst">不通过原因:{$refusal_reason}</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">

                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}                         
                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div> 
        {/case}
        {case value="13"}
        <!-- 上刊审核中 -->
        <div class="dsk-top">
            <img src="__CDN__/html/img/btn-daishangkan.png" class="dsk-top-img">
            <p class="dsk-top-ps">待上刊</p>
            <p class="dsk-top-ps">审核通过,等待下个周期再次提交。</p>
            <a href="{:url('Task/skList',array('oid'=>$task_info['order_id']))}">
                <div class="dsk-che-list">
                    <div class="border">
                        <ul class="list-nav">
                            {volist name="position_list" id="vo"}
                            <li>
                                <div class="nav-ps">{$vo.position_name}车身照</div>
                                <img src="__CDN__/html/img/tu1.jpg" class="img">
                            </li>
                            {/volist}

                        </ul>  
                        <div class="nv-tu">
                            <img src="__CDN__/html/img/btn_shenhejiantou.png">   
                        </div>       
                    </div>
                </div>
            </a>
        </div> 
        {/case}
        {/switch}
        <ul class="dsk-center">
            <li class="li1">
                <img src="__CDN__{$task_info.xg_img[0]}" class="li1-ce-img"> 
                <p class="li1-ce-ps">{$task_info.task_title}</p>
            </li>
            <li>
                <div class="cen-left">上刊部位</div>
                <div class="cen-rig"><i>侧面</i><i>背面</i></div>
            </li>
            <li>
                <div class="cen-left">展示时长</div>
                <div class="cen-rig">{$task_info.show_time}周</div>
            </li> 
            <li>
                <div class="cen-left">酬金</div>
                <div class="cen-rig cen-rig-money">{$task_info.task_price}</div>
            </li>
            <li>
                <div class="cen-left">上刊时间</div>
                <div class="cen-rig">{$task_info.sk_start_time|date="Y.m.d",###}-{$task_info.sk_end_time|date="Y.m.d",###}</div>
            </li>
            <li class="li2">
                <div class="cen-left">任务说明</div>
                <div class="cen-rig">{$task_info.task_desc}</div>
            </li>                                                                      
        </ul>
        <div class="dsk-skwd">
            <div class="skwd-zuo">
                <img src="__CDN__/html/img/btn_shangkan.png" class="zuo-img">
                <div class="zuo-wz">上刊网点</div>
            </div>
            <div class="skwd-zhong">
                <p class="ps1">{$task_info.position_info.position_name}</p>
                <p class="ps2">{$task_info.position_info.position_address}</p>
            </div>
            <a href="tel://{$task_info.position_info.position_phone}">
                <div class="skwd-you">
                    <img src="__CDN__/html/img/btn_zixun.png" class="y-img">
                </div>
            </a>
        </div>
        <div class="dsk-bottom">
            <p class="dsk-bot-ps">抢单号：{$task_info.order_no}</p>
            <p class="dsk-bot-ps">抢单时间：{$task_info.ordercreatetime|date="Y-m-d H:i:s",###}</p>
        </div>
    </div>
    <!-- 弹框 -->
    <div class="dsk-fixed" style="display: none;"></div>
    <div class="dks-fixed-zt" style="display: none;">
        <p class="dks-zj-bs">取消任务，您将无法获得酬金哦！<br>确定取消么？</p>
        <ul class="dks-fex-nav">
            <li class="q-li">取消</li>
            <li>确定</li>
        </ul>
    </div>
</div>
{/block}
{block name="menu"}{/block}
{block name="script"}
<script type="text/javascript">
    $('.js-cancel').on('click', function () {
        var btnArray = ['取消', '确认'];
        mui.confirm('取消任务，您将无法获得酬金哦！确定取消么？', '', btnArray, function (e) {

            if (e.index == 1) {
                var id = "{$task_info.order_id}";
                $.post("{:url('Task/cancelTask')}", {id: id}, function (res) {
                    if (res.code == '1') {
                        location.reload();
                    } else {
                        mui.toast(res.msg);
                    }
                }, 'json');
            }
        });
    });
</script>
{/block}